<template>
    <!-- 如下容器是用来呈现echarts图形的 -->
   <div style="width:420px;height:250px" ref="chart"></div>
</template>

<script>
import * as echarts from 'echarts'
export default {
    mounted(){
        let chart=echarts.init(this.$refs.chart)
        let options={
            label:{
                emphasis:{
                    show:true
                }
            },
            series:[
                {
                    type:'pie',
                    radius:['35%','65%'],
                    data:[
                        {
                            name:'未消费用户',
                            value:47728
                        },
                        {
                            name:'消费一次用户',
                            value:3221,
                        },
                        {
                            name:'留存客户',
                            value:637
                        },
                        {
                            name:'回流客户',
                            value:105
                        }
                    ]
                }
            ]
        }
        chart.setOption(options)
    }
}
</script>

<style>

</style>